More (untested) conversion to autowrap