Updated to use central database connection.