Remove more globals from views.js