You know what would be helpful? If you would actually state the following:
- What is your program's purpose?
- What doesn't work? / Where do you need help?
Either put comments into the .capx or state in this thread what you need.
You can't expect us to read through all your code and try to figure out what you are trying to achieve through just that.