Fix all JSHint errors. Abstract all debouncing into a single function.