refactored socket logic into seperate file
Merge pull request #14 from alexmckenley/dev

refactored socket logic into seperate file