Reorganize some shared code and allow for git config options.