Rearanged the code. Merged controller.js with view.js and the merged file remaining is controller.js