I noticed that i is given a value in timerstart which is called by buttons click, while the timer ticks with i=i+..
Give i value in the global declarations, may be this is the cause.
When you zip an application, use File-Export as zip, then you will have the layout in the file as well.