Added proper BODMAS recognition for the math function. Changed the isNumber function to support brackets. Added parsing for whole bracket structures as a single element.