Is there a way to clean up this recursion code?

Printable View