Fixes #122

The depth was being hardcoded by the index. I changed it to use recursion in finding the language.