Massive restructuring. Now the user injects a driver object that is used for querying.

Allows different drivers to be created and used without worrying about dependency management.