Refactoring to allow for steps to be performed in isolation