Refactored home page to use a template