Fix typo in comment
Replace magic character with constant
Refactor code
Add testing code for Manacher algorithm