Take a look at the diff and read the inline comments.

separate logic from resumeView into mainView
add init.js file to initalize the views