Add getWord() function to DictionaryManager + small refactoring.