home page styling and code refactoring