Merge pull request #23 from wagnert/master

Minor refactoring for new session handling
Refactor session handling
Merge branch 'techdivision'