Cleanup subtrackers and subqueries