After reorganizing, review the code for things that can be
cleaned up or places where you can take advantage of the new
structure. For example, I found that when all the state
variables are visible from all functions (since they are instance
variables) I was able to reduce the number of arguments I passed
around, which made it easier to create new submethods.
Also I was able to generate better error messages, because even
deeply nested methods were aware of global state.