Last (hopefully) batch of refactorings