Network bug fixes + a  test

This fixes a lot of bugs (*a lot*) that were in the Network set, mainly due to `null` pointers floating around. The tests should be a lot easier to write now though. Also attempts to solve issue #24