Update debounce, remove unused code.