views refactoring and routes