Some minor further refactorings