Minor refactorings for the printing