Fixes a bug where singletons are duplicated across clone operations
make sure we clean up any instances that have become duplicated in the tagMap
Merge pull request #46 from webspinner/master

Fixes the build and some memory issues