Significantly faster

Used a few breaks/continues to speed the process along, and it is far
faster than it used to be.  Still could be sped up a little bit, but it
is good enough for the time being.  Not quite the solution I had in mind
but far simpler.