Tracking bugs fixed and tracking routine condensed