can_reach method reduced to a few lines.
More refactoring.