Implemented Connection Pool n closure for managing connections