renaming to CommunicationListener
moving relevant code parts into client class
moving tag definitions to separate interface
changing protocol checks to if based checks
helper function for parsing message from string