Coding style fixes, refactoring and fixes around key timer
Debounce key states
Only start handling key change events when all key slots have a known state