Improvements to gitgit.save
Refactor code