Some refactoring of the CXF plugin