Refactor navigation and footer for better code reuse.