Fix #29 Cleaned messaging 

Now using types for each message to avoid bugs with certain inputs used in the protocol.