Use ArrayBuffer.distinct instead of LinkedHashMap