Refactored home page to use temaplate