Refactoring CDB and CS with AjaxHandler