Merge all view related JavaScript to view.js