Refactored home page view to render template