Improved toString method to return just numerator when denominator is 1.