Debounce and comment clean-up.

Added working debounce code (bit crude but doesn’t require a library).
Tried to document code to make it easy enough to understand if a user
just wants to modify the action associated with the button.