Refactored SmallestMultiple class