Some refactoring, functions for splitting to words and applying the first pig latin rule.
pig-latin-word and pig-latin