move main.js reference from application.js to the layout file