Small trace refactor