Moved javascript to separate Application.js file