refactor the home page