Session access moved to separate class

Fixes for #652