added documentation, and separated word-navigation functionality