Function writes fractions with negative denominators nicely
Tidy code slightly