Enhance reference tracking.
cppcheck
Cleanup