Some refactoring. M2 is still under developpment. Also added a png of the class diagram obtained by reverse engineering