1. add basic tests for SlashSegment
2. fix some bugs