anchor.diff:  
   	var/id = "" 				// must match conveyor IDs to control them
   
  -	var/list/conveyors		// the list of converyors that are controlled by this switch
   	anchored = TRUE
   	speed_process = TRUE
   
   
   
   /obj/machinery/conveyor_switch/Initialize(mapload, newid)
  -	..()
  -	if(!id)
  +	. = ..()
  +	if (newid)
   		id = newid
  -	update()
  -
  -	return INITIALIZE_HINT_LATELOAD //for machines list
  -
  -/obj/machinery/conveyor_switch/LateInitialize()
  -	conveyors = list()
  -	for(var/obj/machinery/conveyor/C in GLOB.machines)
  -		if(C.id == id)
  -			conveyors += C
  +	update_icon()
  +	LAZYADD(GLOB.conveyors_by_id[id], src)
  +
  +/obj/machinery/conveyor_switch/Destroy()
  +	LAZYREMOVE(GLOB.conveyors_by_id[id], src)
  +	. = ..()
  +
  +/obj/machinery/conveyor_switch/vv_edit_var(var_name, var_value)
  +	if (var_name == "id")
  +		// if "id" is varedited, update our list membership
  +		LAZYREMOVE(GLOB.conveyors_by_id[id], src)
  +		. = ..()
  +		LAZYADD(GLOB.conveyors_by_id[id], src)
  +	else
  +		return ..()
   
   // update the icon depending on the position
   
  -/obj/machinery/conveyor_switch/proc/update()
  +/obj/machinery/conveyor_switch/update_icon()
   	if(position<0)
   		icon_state = "switch-rev"
   	else if(position>0)
  
positive.code: 		return
  	operated = 0
  
  	for(var/obj/machinery/conveyor/C in conveyors)
  		C.operating = position
  		C.update_move_direction()
  		CHECK_TICK
  
negative.code: 	icon_state = "conveyor[operating * verted]"
  
  // create a conveyor
  /obj/machinery/conveyor/Initialize(mapload, newdir, newid)
  	. = ..()
  	if(newdir)
  		setDir(newdir)
  	if(newid)
  		id = newid
  	update_move_direction()
  	LAZYADD(GLOB.conveyors_by_id[id], src)
  
  /obj/machinery/conveyor/Destroy()
  	LAZYREMOVE(GLOB.conveyors_by_id[id], src)
  	. = ..()
  
  /obj/machinery/conveyor/vv_edit_var(var_name, var_value)
  	if (var_name == "id")
  		// if "id" is varedited, update our list membership
  		LAZYREMOVE(GLOB.conveyors_by_id[id], src)
  		. = ..()
  		LAZYADD(GLOB.conveyors_by_id[id], src)
  	else
  		return ..()
  
  /obj/machinery/conveyor/proc/update_move_direction()
  	switch(dir)
  