Slice algorithm now uses objects instead of lists