Remove unused code in provider.