Added a comment because I had to remember what my own code was doing.
Labeled the assignment arrays with comments
Added more comments
Fixed device switch buttons jumping two devices at once (because they were responding to the 'release' message)