Update

Cleaned up some style and memory issues, and place the label in the middle of the longest segment.