Added a Button Debouncing Function.