Make gather_script more comprehensive