Small partial refactoring