Small refactoring before merge