Introduce MODtoChars to avoid code duplication.
Merge pull request #1546 from AndrejMitrovic/RefactorMod

Introduce MODtoChars to avoid code duplication.