Added some basic exception handling and created the layouts for those pages