Refactored code for home page
Refactored code for home page once more