Issue118 netlist construction

Fixes #118. There are couple of TODOs here that I would like some comments/suggestions on before this is merged, but thanks to the power of sharing, we now have netlist building in about 100 lines of code.