Mostly small changes to tracking lib