added duration and divisions to Measure
Factored out editing logic to UI-independent service.
Update and layout features.