code cleanup in "session" model.