Added debug trace
Micro refactor