Refactor librairie for use abtract class