Modified the socket object to be singleton