Major improvement for activity tracking. Fixed and improved debouncing.