Cosmetics

*isValid renamed
*simplify methods in HgVersion