Moved sorting from sample successors to setup, maybe squashed bug
Fixed main