Change some typecasts from int to Integer
Changed Hashmap declaration