Adding StepDetector and StepListener from bagilevi's GitHub source code.