big refactoring to prepare a release for ISO/IEC 23002-5