Added (very) rudimentary button debouncing.