Updated HomeController - fixed bugs.