Move toward common code in barf for setting up import/export