Clean up planner + update stats.