fixed slicing when ending is at boundary
Merge branch 'upstream' into all
added support for rehearsal marks
Merge branch 'reh-feature'