Added debugging traces
Minor refactoring.
Authored by: jflavoie 2020-10-29
Parent: [r18]
Child: [r20]