Added Mercurial and some small fixes