template cleanup
provider refactoring