Reorganizing imports to avoid import loop