In progress: moving packed script generation code to AsyncTask