Debounce

Debouncing a function ensures that it doesn't get called too frequently.