Refactor VCS detection #2