Removed unused imports, DEBUG_MODE set to False, added basic 404, 500 error pages