Made Session object more functional