Clean up import code