Added (unfinished) code for parsing and packing messages