I had to ditch the loop because it gets stuck and goes around for
ever, but without the loop it works fine. A couple of the offset
replacements don't seem to want to replace for some strange reason,
but your code was a huge help and I think I can take it from here.