Rewrite CTEProxy class to use delegate