Moved for each loop to GetAllWords method
Signed-off-by: Psiloc <Psiloc@gmail.com>