Welcome to Loops 4 Life, where the only constant is change. Except for the code, that's still a mess.
Here's a primer for the basics:
Or if you're feeling adventurous: