Clean up network module and PEP8 adjustments.

Made the network module more readable and removed some old crud. PEP8 corrections as best I am able.

Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>