add MathML semantics and move annotations to end