Fix asyncnet example. Rearrange net code.