Initial refactored replacement.