Move local variables into objects or smaller blocks

The previous commit modified AutoarExtract; this commit modified AutoarCreate.