Introduce checkStep in tests.
Improve tests.
Improve test coverage