home view refactoring