Minor Changes and Added checkPalindrome & countWords