Continued refactoring provider code.