nav: add support for highlighting nav items and cleanup to related code