Did a bunch of refactoring, moving VCS and DTO's into common lib, and added mercurial experimental support