Fork of hg.mgeek.fr with some improvments