small amount of refactoring on homepage