refactor and cleanup
removed accidental extra space
Fixed git_dirty test bug.