WIP fixing provider things
Justins fixes, moving configuration away from scary function scope.
Merge pull request #1 from EQCO/providering

WIP fixing provider things