Revamped the main views.js.
Different screens can now be worked on different files.
Fixed the events not firing problem.