Add in data script and made some updates to the code