Improved Session, added tests