Fixes for issues with loading config, and metaclass-based provider detection. Will take another crack at it.