Add duration view, templates and functions
Generalize repeated functions
Add piece duration charts
Add cluster view, template and functions