Small refactoring

Small refactorings, thanks in advance for your feedbacks