minor coding style fixes.
doc: added syntax highlighting to the code samples.