Added C++ support. Added extra verification macros