Add support for CWE
Land #2140, add CWS as a first-class reference.