Improved output and cleaned up error handling