refactoed home page.