I didn't look through your code with a fine toothed comb but the one thing that jumps out at me is your use of the wait event. I believe that you should be using a timer behavior instead for that.
Also, since you're using the free version, I think you should be able to save yourself a few events by moving your events (not triggers) in 53 and 54 all up to 52. You will need to make more events for the timer behavior though if you change it out with the wait, which you should.