I think it would be better to delete the scheduled within this function by passing the schedule_id down. Maybe add the delete on line after 214. This way the cleanup will be closest to where we know we need to do this. Otherwise it may not be obvious and someone could add a way to return 'None' from this method, potentially deleting the schedule on accident.