Fixed downloading from hg/git. Added two version variables.