Migrating functionality from Mark to ContextMark.