Extract two methods. No functional change.