V2before destroy controller

Work from #1343 brought into v2.0.0-pre.x branch