fix the the git fields and a small refactor