Refactoring step-dfa