Move valid Scrabble words to function