A few more simple refactorings/small improvements.