Added Netlist unit test and fixes