Api mods

Modifications in the API to match the paper. Mainly Stream operation consume and produce. The examples also changed accordingly.
Again, why do this?  Why does the API return both if we just filter it out and not return it to the user?