Refactored view.html, fixes #213
Moved JS to fragments
Clean up fragment code
Merge pull request #248 from MediaCrush/view-refactor

Refactored view.html, fixes #213