Simplify make_type code