fixed a bug where a fraction with a negative numerator was not recognized as a number. moved code to a helper method applyNextFraction to reuse code for this case
fixed a bug where any token longer than 1 char would only be checked as a fraction. now properly checks as a fraction or command (abs, n, c, etc)