Refactoring of QueryPlan construction

Moved all QueryPlan producers into an object - QueryPlanProducer