Remove non-LaTeX symbols
Consolidate closing brackets test code
move brackets test to last
remove Angle (capital A) expr type