Cleaning up IsPalindrome a bit.