fix shebangs and add one more data gathering step
add applicaton_ids and app_application_ids for grants, apps