Merge planner and grounder classes.