Cleanup old session code