Moved JS from master into main.js