More elegant error handling by raising exceptions.
Clean up requirements