Adds tail recursion elimination