cleaned up the c++ code a bit.  added a test.
tweak to pom