Added tests and documentation to support the rebasing concept.