slot the ObjectDict
minor tweak to destroy logic
code refactor and minor tweaks

This refactors the logic for generating the tagged object. It also
updates the destructor to ensure that the managed items are destroyed.