Replaces Seq with HashSet, removes redundant import