Use hashmap instead of map. Removed 2 instances.