Refactoring the home page