allSlices goes from 0 to maxSlice-1
Merge remote-tracking branch 'origin/master'
big refactor of the main: trivial case, half hard and hard based on slices segments done