Refactor IMsg interface (add getBytes())