Code Maintenance

Fixing broken build in tests and addressing numerous warnings.  I have not tested the test code that was not compiling earlier but I believe I have corrected the logic of the test.