Improvements to connection pool