Refactor steps for more general use