Removed unnesesary semi-colon
MathJS is no longer added as a property of window. Adds typedefinition to the methods, and implements the countDigits method