Code review for view.js