Improve SessionManager unit test coverage, and fix two namespacing bugs