refactoring out common functions into a CppUtils shared library