Improve navigate.py with larger files