Reworked Connect*, added encoding and Message clas