Added clang support
Fixed errors in examples