Clean up and added error handling exceptions
more error handling exceptions