Added segmentation with RLSA and trees.