Refaktored networkServer to not be a listener