Make the transition algo a little more accurate.

There are still some weird kinks in the traversal algorithm. For
example, trying to go from 9 -> 19 fails very oddly.