Refactor NewSession()