Some template changes. Added some mercurial support.
Modified javascript snippets.