Refactoring home view