Initializing default session if none is passed in the request
Fixing a few failing tests
Cleaning up some code