Fix examples and update documentation.