Fixed import and name errors in examples.