Overdo CodePro Cleanup

Finally cleaned up some of the code based on the CodePro Audit tool.  No
functionality changed, purely refactoring our code.