view, layouts refactoring