Improved toString() to output a whole number if a denominator is 1