Refactor for cleaner design and configuration.