Turned the db object stored on the module to be a function since require caches the module without the property.