Small refactoring, as base for the larger refactoring.