You can move all this to application.js its just init code anyway.