Refactor into Git class