Work with View and Errors

Added more error handling and added functionality to view. Also worked
on controller.
Further work with output and cookies