Refactored rebase