Add mercurial and improve settings