Cleans up sub_provider method