Clean up error handling and update README.