Added DICTIONARY argument to recursive calls, and reformated.
Fixed typos.