MEDITE adaptation: refactorings