TreeMap -> LinkedHashMap, fix tests