Fix Network.check_valid_range and some other things

**Resolves issues #742 and #738.**
It's not terribly readable, but it's more concise, and I feel that conciseness is important in a project this large and disorganized.

Or maybe I just like using language features.