Use of EnumMaps instead of HashMaps for enums.

It doesn't hurt to use EnumMaps for the other modules, as well as in the tests.