DRY Marc editor shared context

Changed examples to methods for easier reuse