Implement betfor-classes, and header parsing.