Reduce memory footprint in consumer class

and simplifier a bit a code
Merge pull request #2 from lyrixx/consumer

Reduce memory footprint in consumer class