Tidied up debounce, probably