Add support for `segment.expand`

Closes #154
Implement segment truncation

Closes #161 (requires implementation for specific segments though)