Added optional debugging code in object management.

3 files changed