more application.js fixes