Cleaned the code up, replacing references to xid --> slice_id