Updates and fixes for examples

Updated examples and other fixes.