And there be the logic error I thought I saw earlier...
Now build you program up and see what happens...then we can work on optimizing that program a bit. I looks a bit of a mess...not too bad, but could be better...