Code cleanup. Added addition JSDoc comments for custom error objects.