Refactor most session state into sessionInfo object.