Changes to base code re session handling