Finished navigation generation script in view and controller