Add palindromic? function
Refactor solution a bit