GH-5 Restructured code and bugfixes

Callbacks are defined as separate variables
addWire() is now working
addGate() missing-gate bug is now fixed