Improve Tracker performance by using static variable inside function
Small code cleanup