Switched HashMaps to TreeMaps.