Refactored code for managing git object types.