Some changes and an implementation

Thanks for your efforts, just a few additions.  Plus, an example implementation