More DRY, more unit tests and support for --github-url