Add custom errors

Implement custom errors for non success responses.
Minor spelling corrections and other cleanup.