fixes init functions for application.js
includes mocking strategy and building