Modifying keypad_decoder to remove syntax errors and fix minor issues found through compilation.