navigation issues, a bit of code cleanup