Refactor nav and header for clairty and efficiency