Improved the palindrome function to ignore punctuation