Bug and CodeClimate fixes

Some bugs have cropped up when running on Travis.  These changes fix
some of those bugs and eliminate some duplication highlighted by
CodeClimate.

[#61738342]
Merge 61738342-abstractions to master

[#61738342]