[BE] strips recursion + basic heuristic + minor improvements