Clean up network code