Cleaned up imports in main/views, moved some functions in nav_context.py to utils.py