controllers, views, routes code cleanup