A fairly elegant refactoring of the sum of multiples algorithm