Cleanup and tweaks to connection pool