Start cleaning up tests.

No mocking of the session factory.
More removal of the session factory mock.
More session factory mock cleanup
yet more session factory mock cleanup