Added a feature to track custom destruction and spawning events.
Minor order change