Refactor HomeController