File reorganisation

Created a view folder for the subpages.
Fixed bug causing premature termination

Removed exit() from functions causing page not to be rendered when there
are errors.
Code cleanup

Made addressing uniform and removed unnecessary condition in
if-statement.