Refactor homepage