Have getOccurrences() return empty lists instead of null.
Implemented findRepeats()