Added some integration tests
Extracted sesssion object