Part 3; Added a lot of controller and view/tempalte logic