I'm glad it works, but if I can offer some more advice regarding general programming practices, don't fall into the "not invented here" trap. Just because someone else wrote something doesn't make it bad, just because you wrote something doesn't make it good (and vice versa). You said that NorthGuy's code was exactly what you were after, but then you've basically ignored it and continued with your original mess. OK it's a little bit less of a mess now, and it works, so that's an obvious improvement but NorthGuy's design is far easier to read and understand and presumably does the same thing (I still haven't managed to follow your code all the way through to confirm that).
If the two are functionally equivalent, then you should have thrown yours out and used his. Yeah it sucks to see something you've worked hard on get chucked out and replaced with someone else's work, but part of being a good designer is recognising good design even when it isn't your own and knowing when it is better to abandon a given approach and start over.