CHANGED: Network - Moved all socket handling into new SocketManager class.