Tidy provider code
Merge pull request #689 from adam111316/tidy

Tidying provider code