Refactor the code to separate ui logic from application logic. This is still work in progress, but this commit lays the foundations for this to happen fully. We introduce two new objects, the 'Segment' which just holds the segment data, and the 'SegmentScene' which holds the segments and handles all the operations on the segments in the scene. Events such adding or modifiying segments can be tracked so the UI can update itself. It is also possible to associate objects with segments in the scene, so UI elements can find each other through segments.
Merge pull request #69 from aliceh75/refactor-separate-ui-logic

Refactor the code to separate ui logic from application logic