Improve module-related type definitions.