Big code refactor.

* Updated gem so jobs don't autoload.
* Database is a gingleton.
* Fixes Account/Provider logic so it has less coupling.