Use full ids with the parent path included and did more on the calls to before/after Activate/Deactivate, along with other cleanup.