Minor refactors for merging.