Makes functions more generic (shorter) by replacing ArrayList with List and LinkedHashMap with HashMap.