Rework message parsing in port