Use Set/HashSet and LinkedHashMap where possible
Also fixed some reload errors