Modified code to account for vertex change. Also added some batch scripts