Refactored mapi types.