Moving highlighted code to MTZSegmentView