cleaned up some code in the session tests