rebase and cleanup