Merged view scripts into view.js

In prep for view refactoring
Subscribe offline and subscribe preview