Better abstraction to allow easy redefinition of trace tasks