Refactorings for #60.