Remove type optional from header, remove related tests, improve type_field