rebase: Cleanup dead variables and origin references
Add --add-metadata-string argument, for version, and version checking.