Optimizations to the planner