Mosync git selection code
refactored script into distinct functions to aid logical development, outlined patch application etc.