Changed implementation to use HashMap<String, List<Entry>> instead