Refactor stepdefs