Refactor GIT stuff (mostly test hierarchy)