Refactorisation

Avoid code duplication.
3 tests skipped, 100% success otherwise.