Refactor server into network.