Refactoring on homepage