Refactor imports to prevent import errors.