The white/brown and green/red wires are fine. These are your switch row and column wires respectively. There are 2 green/red because the column wire "daisy chains" to the next switch. The oddball is the yellow wire. What's the other end of that attached to? Only switch matrix wires should be connected to switch matrix switches, these are a low voltage digital signal wire. If you ever short any of these (even accidentally coming across them with a tool like a screwdriver) to a power wire such as for solenoids, and the game is on, you will likely blow up the switch matrix - like you did.