cleanup: merge and rebase helpers