CXF-5616 clean up the code
CXF-5610 clean up the code