Added a connection manager so that sockets are only opened once per connection manager instance
The connection manager maintains the old system performance, no improvements were done. A couple of action points were identified and marked with "// TODO"