Reduce memory footprint in consumer class

and simplifier a bit a code