network: write network units with user units

This allows us to test the network unit generation as well as removing
some special-cased code.
Merge pull request #282 from crawford/network

network: write network units with user units