Added a separate method to do initial setup of the session, between creation and start.