Big refactoring: reorganisation of packages and classes and remove useless classes