Much more work on the data harvesting script. Nearly working