Refactor primitive handling in Netlist/BlackBox

Closes #10
Fixes #15