libframes v2: separate frame processing classes from specification of frame structure