handle failures better in scons for examples
fixup minor things and whitespace
simplify and replace json::value with document