Style fixes; remove lookup.var(); adjust tests accordingly
Add input validation
Fix erroreous listen test
Fix erroreous upstream tests
Bugfix: $upstream_nodes was not filled out correctly