Work on datagathering (and inserting into DB) script