Added recursion and other things.