cdn refactoring