Replaced some deprecated  in view.js