Implemented grunt functionality and updated js source structure