Use of EnumMaps instead of HashMaps for enums.

EnumMaps are tweaked for optimal performance when using enums as keys.