cleanup, create defined_types