Modifying helper methods to work with IndexedSeq[T] rather than Vector[T]