Create ParseErrorMessage if error message is null.

Also added comments for a few methods.