Better error handling
Cleanup.