Fixed tests to match the new API

Had to fix all teh tests to work with the new API. Build succeeds
without tests, but linker errors occur with tests.