Little refactoring in radix tree, palindromes