clean up step

Make the main loop a little easier to understand.