Updated documentation with full working example.