Refactor: separating input from context in planning

o using an unique context when planning
o sub query lookup table is not in the context anymore