bit more refactoring, preparing to create other providers
more cleanup