minor session refactoring in prep for upcoming changes discussed in #590