CXF-5610 clean up the code