Debug functions and reduce tick count