Refactoring according Arnaud's comments