hocrTransform: code cleanup