Refactor ConnectionPool