Various rebase improvements