Moved entity-specific network code to entity objects.