if you use entity pointers for created entities like ENTITY* racing_car1 = ent_create(...); I think they should be removed by ptr_remove(), and set to = NULL; before you want to use in another level. Or remove it with an if statement for safety: if(racing_car1!=NULL) {ptr_remove(racing_car1); racing_car1 = NULL;} it can cause problems if you don't do it before using again.
actions are stopped automatically on entity remove, and you can stop your other functions having loops by proc_kill. and check their running by proc_status.