Refactorisation code