Added code to delete the curve tree if there any changes to assembly