added tests for LatexParser and fixed some things