Change lib/palindrome to a class