Improved errors
Added some documentation for the error types
Context should be private