Fixed some build errors. Extended examples.