Minor refactoring as reaction of the PR feedback. Thx @raphaelstolt