Refactored home page view to use a template - corrected