Refactor project-application.js and user-profile.js.