Move js to Application.js and fix update of routes