Refactor repo-legacy.js, remove messy global variables. Fix errors. Fix an error in Sortable Fix a incorrect call assignMenuAttributes from the template
* clean up async/await, and sort init calls in `index.js * use `const _promise` to indicate that we do not need await an async function