Refactor and add home page