Converted database to use connection pools