Rename 'euclidean algorithm' to 'euclidean division theorem'. Also rename the 'q' variable to 'd'