refactored get_context_for_word(), closes #76 (still the new version is not used everywhere it can be)