refactor linking of imports