detectSteps cleanup