Updating collectlayers command to use providers.