Refactoring of routes and views fixes