Moved is_palindrome function to utility library.