core: refactor ImportSources to include the type