Fixed the memory leaks in palindrome and put in our fixes in the txt file