See also http://scratch.mit.edu/projects/34012798/ to see this used to simplify fractions...
Showing how to find largest common factor using Euclid's algorithm.