Add set_segments_rootpath instruction (refs #12)
Some code cleaning