Refactoring homepage