Merge branch 'jk/alternate-ref-optim' into maint