Rename keypad.c/.h to keypad.c/.h.
Add common.h to hold common includes, types and macros.
Refactor main.c to reduce overall clutter.