You were right! A ground had come off while I was trying to make some space for the lights.
I've got all the buttons working on the old messy code, but when I change it to yours it doesn't work right.
I press any button and it works once then nothing works after that.