#20: Added _neighbours_pattern(), some small refactorings.
#20: Refactorings - some code from _collect_paths() moved to _predecesors_pattern().
#20: Added docstring for _match_elements().