Remove most of the depcrated issues with the tests
and code.

Fix some other nits with the code.

Update and get the existing rspec and rake tests
running again.