Rebase and improvements