Optimize remplaceAttributsVar method and create getVars method.