Replace run() by sweep()

And remove hard-coded getReferences parameter