clean up navigation code for profile pages