PR #195 bit of style cleanup and error handling and test for error handling