Slightly simplify recursion logic, further dividing complexity.