Fixed wires leaking signals from internal connections

- Wires shouldnt output to side r if it connects internally on that
side.
- Minor code cleanup
Merge pull request #3 from MrTJP/master

Fixed wires leaking signals from internal connections