Query throttling

The changes made perform a better import way. This reduces very much the queries, making the import proccess less expensive.