Refactor remaining database connections.

Collected all of the database connections into one resources file.