Merge pull request #26 from wagnert/master

Refactor session handling
Refactoring session handling + minor bugfixes
Merge branch 'techdivision'