Fixed error for fractions 0

Fixed:
Invalid fractions of 0 don't work (makes it a 0/0 fraction rather than 0
- not sure what's going on)
Added remove whitespace function

not working. need to debug