Move term types into modules