Some variable improvements. Start to implement MathML template substitution