Purely serial implementation of net.  Verbatim port of prototype.