Refactored into a builder pattern.