HH-37492 more cleanup and proper error message formatting
HH-37492 PEP8ify