Add rebasing functionality.