Can you revert to the working code and post that? Perhaps we can see a way to gradually add some more functionality.
Why do you want to trade the servo for a stepper? It's not a big deal, but the stepper solution probably means you'll need to home it at startup to a microswitch so you know where it is. I suppose you might not care, but just know from frequency readings that you have to turn one way or the other.