Refactored code for styles regarding the home page