Tried to make the remove intervals non-inclusive in the ends in order to fix remove event errors.