clean up navigation code