Remove duplicate code in vcs driver