Recursion is your friend. Embrace it!

Actually, separating out these discrete bits offers more utility and I like that.