Refactor and add code to permit the package repository and downloader clients to be self-updated.