Added delete function to edit_phase, cleaned up act_cal (work in progress)