refactor SkyLine problem, abstract Segment and SegTool concept