anchor.diff:  		dat = wires.GetInteractWindow()
   
   	else
  -		if(screen == 1)
  -			dat = main_win(user)
  -		else
  -			dat += category_win(user,selected_category)
  +		switch(screen)
  +			if(AUTOLATHE_MAIN_MENU)
  +				dat = main_win(user)
  +			if(AUTOLATHE_CATEGORY_MENU)
  +				dat = category_win(user,selected_category)
  +			if(AUTOLATHE_SEARCH_MENU)
  +				dat = search_win(user)
   
   	var/datum/browser/popup = new(user, "autolathe", name, 400, 500)
   	popup.set_content(dat)
  
positive.code: /obj/machinery/autolathe/proc/main_win(mob/user)
  	var/dat = "<div class='statusDisplay'><h3>Autolathe Menu:</h3><br>"
  	dat += "<b>Metal amount:</b> [src.m_amount] / [max_m_amount] cm<sup>3</sup><br>"
  	dat += "<b>Glass amount:</b> [src.g_amount] / [max_g_amount] cm<sup>3</sup><hr>"
  
  	var/line_length = 1
  	dat += "<table style='width:100%' align='center'><tr>"
  
negative.code: 
  	var/datum/design/being_built
  	var/datum/research/files
  	var/list/datum/design/matching_designs
  	var/selected_category
  	var/screen = 1
  
  