The import/export functions are rather crude- should look more closely at ctools