Implement new gate structure
Merge branch 'master' of https://github.com/alexjwong/logic-simulator