adding more descriptive error codes for API return values
adding comments, tweaking output text