fix up and refactor home view