Move functions in Tracker to allow easier testing
Add comment on confusingly correct code
Add test for Tracker