Refactored markup tracing system.