Extract deps and add import paths