Cleaning up networking code.