refactored communication
Merge pull request #11 from erikchalmers/master

refactored communication