Merge "Create onTeardown and use it." into main