Improved examples to use lifetimes. Fixed typo.