[rewrite xml export] more code cleanup
[rewrite xml export] multimeasure rests
[rewrite xml export] more bug fixes
[rewrite xml export] more stability