Removed logging and improved error handling drastically.