Refined planner algorithm
Optimizations for improved gc