Again Committing the TreeMap related changes

Hard merge please see if it works for you !