fixes to otp code, fixes to tests, started repairing the TraceRunner