Data exchange improvements

This branch follows up commit 24a99df, available from pull request #124. Contains additional fixes to the cmake builder as well as an exemple.