refactored ModuleRelDefn and removed many type synonyms