Fix issues with examples. Modify code for verification