Improved error handling
Improved documentation