[WIP] poc/apiimport2.0

I think this huge block could be more readable. Maybe to extract in several methods