I re-wrote the entire system. I did copy and paste a few segments from the previous system. The result of this new version seems to work well from what I have seen so far.