Refactored some of the communication methods to use the net.Conn interface, removed some redundant code