Cpp export updates

fixes details of exporting to cpp