Megapatch that centralizes tracking logic and fixes some oddities