Refactored home page to use template