Refactoring version querying

Trying to make it easier to have both mercurial and git capabilities.
Adding Git repo state querier