views, tests refactoring