A couple of minor refactorings