refactored session class and adapters, added test suite