Cleaned up code and prepared move/copy tracking.