moved main() to navmesh.c