Changed all occurences of primitive type int to reference type Integer to enable insertions in weakly typed hash maps (e.g. in message generation).