Updated code examples to match code changes