Tracking logic refactor