Adding better error handling, added http error pages