[IMP]crm: remove subtype related stuff and improve code.