Move generic data message parsing into separate module