Added some tests for proper tail recursion