Moved network code to network.rb
[cleanup]
Refactored network module to have all the networking code in there.
Merge pull request #30 from swilliams/master

Refactored network code to its own module.