More git methods and refactoring