Moved CAF into namespace.
C++ified CAF.