refact parse imports a bit