Implement segment creation and resizing