Streamlining recursion.