connection pooling and minor changes