Refactor import()