Cleaned up.
Updated readme and added error handling.