DRYed projects a bit, fixed dependent destroy