Refactoring to a Builder design-pattern.