Api mods

Modifications in the API to match the paper. Mainly Stream operation consume and produce. The examples also changed accordingly.
Why didn't we want to do this the optimal way?