merge cdx server refactoring/cleanup