fixing views, routes and removinf deprecated functions