Solution 4

Smallest Multiple solution and a bit of refactoring