anchor.diff:  		. += "<div id='[REF(MT)]'>[MT.get_equip_info()]</div>"
   	. += "</div>"
   
  -
  -
  +///HTML for commands.
  +/obj/mecha/proc/get_commands()
  +	. = {"
  +	<div class='wr'>
  +		<div class='header'>Electronics</div>
  +		<div class='links'>
  +			<b>Radio settings:</b><br>
  +			Microphone:
  +			[radio? "<a href='?src=[REF(src)];rmictoggle=1'>\
  +			<span id=\"rmicstate\">[radio.broadcasting?"Engaged":"Disengaged"]</span></a>":"Error"]<br>
  +			Speaker:
  +			[radio? "<a href='?src=[REF(src)];rspktoggle=1'><span id=\"rspkstate\">\
  +			[radio.listening?"Engaged":"Disengaged"]</span></a>":"Error"]<br>
  +			Frequency:
  +			[radio? "<a href='?src=[REF(src)];rfreq=-10'>-</a>":"-"]
  +			[radio? "<a href='?src=[REF(src)];rfreq=-2'>-</a>":"-"]
  +			<span id=\"rfreq\">[radio?"[format_frequency(radio.frequency)]":"Error"]</span>
  +			[radio? "<a href='?src=[REF(src)];rfreq=2'>+</a>":"+"]
  +			[radio? "<a href='?src=[REF(src)];rfreq=10'>+</a>":"+"]<br>
  +		</div>
  +	</div>
  +	<div class='wr'>
  +		<div class='header'>Permissions & Logging</div>
  +		<div class='links'>
  +			<a href='?src=[REF(src)];toggle_id_upload=1'><span id='t_id_upload'>[add_req_access?"L":"Unl"]ock ID upload panel</span></a><br>
  +			<a href='?src=[REF(src)];toggle_maint_access=1'><span id='t_maint_access'>[maint_access?"Forbid":"Permit"] maintenance protocols</span></a><br>
  +			[internal_tank?"<a href='?src=[REF(src)];toggle_port_connection=1'><span id='t_port_connection'>[internal_tank.connected_port?"Disconnect from":"Connect to"] gas port</span></a><br>":""]
  +			<a href='?src=[REF(src)];dna_lock=1'>DNA-lock</a><br>
  +			<a href='?src=[REF(src)];change_name=1'>Change exosuit name</a>
  +		</div>
  +	</div>"}
  +
  +
  +/obj/mecha/proc/get_equipment_menu() //outputs mecha html equipment menu
  +	. = {"
  +	<div class='wr'>
  +	<div class='header'>Equipment</div>
  +	<div class='links'>"}
  +	if(equipment.len)
  +		for(var/X in equipment)
  +			var/obj/item/mecha_parts/mecha_equipment/W = X
  +			. += "[W.name] <a href='?src=[REF(W)];detach=1'>Detach</a><br>"
  +	. += {"<b>Available equipment slots:</b> [max_equip-equipment.len]
  +	</div>
  +	</div>"}
   
   /obj/mecha/proc/output_access_dialog(obj/item/card/id/id_card, mob/user)
   	if(!id_card || !user)
   		return
   	. = {"<html>
  -						<head><style>
  -						h1 {font-size:15px;margin-bottom:4px;}
  -						body {color: #00ff00; background: #000000; font-family:"Courier New", Courier, monospace; font-size: 12px;}
  -						a {color:#0f0;}
  -						</style>
  -						</head>
  -						<body>
  -						<h1>Following keycodes are present in this system:</h1>"}
  +			<head>
  +				<style>
  +					h1 {font-size:15px;margin-bottom:4px;}
  +					body {color: #00ff00; background: #000000; font-family:"Courier New", Courier, monospace; font-size: 12px;}
  +					a {color:#0f0;}
  +				</style>
  +			</head>
  +			<body>
  +				<h1>Following keycodes are present in this system:</h1>"}
   	for(var/a in operation_req_access)
   		. += "[get_access_desc(a)] - <a href='?src=[REF(src)];del_req_access=[a];user=[REF(user)];id_card=[REF(id_card)]'>Delete</a><br>"
   	. += "<hr><h1>Following keycodes were detected on portable device:</h1>"
  
positive.code: 
  /obj/mecha/proc/get_stats_html()
  	. = {"<html>
  						<head><title>[src.name] data</title>
  						<style>
  						body {color: #00ff00; background: #000000; font-family:"Lucida Console",monospace; font-size: 12px;}
  						hr {border: 1px solid #0f0; color: #0f0; background-color: #0f0;}
  						a {padding:2px 5px;;color:#0f0;}
  						.wr {margin-bottom: 5px;}
  						.header {cursor:pointer;}
  						.open, .closed {background: #32CD32; color:#000; padding:1px 2px;}
  						.links a {margin-bottom: 2px;padding-top:3px;}
  						.visible {display: block;}
  						.hidden {display: none;}
  						</style>
  						<script language='javascript' type='text/javascript'>
  						[js_byjax]
  						[js_dropdowns]
  						function SSticker() {
  						    setInterval(function(){
  						        window.location='byond://?src=[REF(src)]&update_content=1';
  						    }, 1000);
  						}
  
  						window.onload = function() {
  							dropdowns();
  							SSticker();
  						}
  						</script>
  						</head>
  						<body>
  						<div id='content'>
  						[src.get_stats_part()]
  						</div>
  						<div id='eq_list'>
  						[src.get_equipment_list()]
  						</div>
  						<hr>
  						<div id='commands'>
  						[src.get_commands()]
  						</div>
  						</body>
  						</html>
  					 "}
  
  
  
  /obj/mecha/proc/report_internal_damage()
  	. = ""
  	var/list/dam_reports = list(
  		"[MECHA_INT_FIRE]" = "<span class='userdanger'>INTERNAL FIRE</span>",
  		"[MECHA_INT_TEMP_CONTROL]" = "<span class='userdanger'>LIFE SUPPORT SYSTEM MALFUNCTION</span>",
  		"[MECHA_INT_TANK_BREACH]" = "<span class='userdanger'>GAS TANK BREACH</span>",
  
negative.code: 		return
  
  	if(in_range(src, usr))
  		//Start of ID requirements.
  		if(href_list["id_card"])
  			var/obj/item/card/id/id_card
  			id_card = locate(href_list["id_card"])
  			if(!istype(id_card))
  				return
  
  			if(href_list["req_access"])
  				if(!add_req_access)
  					return
  				output_access_dialog(id_card,usr)
  				return
  
  			if(href_list["maint_access"])
  				if(!maint_access)
  					return
  				if(state==0)
  					state = 1
  					to_chat(usr, "The securing bolts are now exposed.")
  				else if(state==1)
  					state = 0
  					to_chat(usr, "The securing bolts are now hidden.")
  				output_maintenance_dialog(id_card,usr)
  				return
  
  			if(href_list["add_req_access"])
  				if(!add_req_access)
  					return
  				operation_req_access += text2num(href_list["add_req_access"])
  				output_access_dialog(id_card,usr)
  				return
  
  			if(href_list["del_req_access"])
  				if(!add_req_access)
  					return
  				operation_req_access -= text2num(href_list["del_req_access"])
  				output_access_dialog(id_card, usr)
  				return
  			return //Here end everything requiring an ID.
  
  		//Here ID access stuff goes to die.
  		if(href_list["finish_req_access"])
  			add_req_access = 0
  			usr << browse(null,"window=exosuit_add_access")
  			return
  
  		//Set pressure.
  		if(href_list["set_internal_tank_valve"] && state)
  			var/new_pressure = input(usr,"Input new output pressure","Pressure setting",internal_tank_valve) as num|null
  			if(isnull(new_pressure) || usr.incapacitated() || !state)
  				return
  			internal_tank_valve = new_pressure
  			to_chat(usr, "<span class='notice'>The internal pressure valve has been set to [internal_tank_valve]kPa.</span>")
  			return
  
  	//Start of all internal topic stuff.
  	if(usr != occupant)
  		return
  
  	if(href_list["update_content"])
  		send_byjax(usr,"exosuit.browser","content", get_stats_part())
  		return
  
  	//Selects the mech equipment/weapon.
  	if(href_list["select_equip"])
  		var/obj/item/mecha_parts/mecha_equipment/equip = locate(href_list["select_equip"]) in src
  		if(!equip || !equip.selectable)
  			return
  		selected = equip
  		occupant_message("You switch to [equip]")
  		visible_message("[src] raises [equip]")
  		send_byjax(usr, "exosuit.browser", "eq_list", get_equipment_list())
  		return
  
  	//Toggles radio broadcasting
  	if(href_list["rmictoggle"])
  		radio.broadcasting = !radio.broadcasting
  		send_byjax(usr,"exosuit.browser","rmicstate",(radio.broadcasting?"Engaged":"Disengaged"))
  		return
  
  	//Toggles radio listening
  	if(href_list["rspktoggle"])
  		radio.listening = !radio.listening
  		send_byjax(usr,"exosuit.browser","rspkstate",(radio.listening?"Engaged":"Disengaged"))
  		return
  
  	//Changes radio freqency.
  	if(href_list["rfreq"])
  		var/new_frequency = radio.frequency + text2num(href_list["rfreq"])
  		radio.set_frequency(sanitize_frequency(new_frequency, radio.freerange))
  		send_byjax(usr,"exosuit.browser","rfreq","[format_frequency(radio.frequency)]")
  		return
  
  	//Changes the exosuit name.
  	if(href_list["change_name"])
  		var/userinput = input(usr, "Choose a new exosuit name.", "Rename exosuit", "") as null|text
  		if(usr != occupant || usr.incapacitated())
  			return
  		if(!isnull(userinput))
  			var/newname = copytext(sanitize_name(userinput),1,MAX_NAME_LEN)
  			name = newname ? newname : initial(name)
  		return
  
  	//Toggles ID upload.
  	if (href_list["toggle_id_upload"])
  		add_req_access = !add_req_access
  		send_byjax(usr,"exosuit.browser","t_id_upload","[add_req_access?"L":"Unl"]ock ID upload panel")
  		return
  
  	//Toggles main access.
  	if(href_list["toggle_maint_access"])
  		if(state)
  			occupant_message("<span class='danger'>Maintenance protocols in effect</span>")
  			return
  		maint_access = !maint_access
  		send_byjax(usr,"exosuit.browser","t_maint_access","[maint_access?"Forbid":"Permit"] maintenance protocols")
  		return
  
  	//Toggles connection port.
  	if (href_list["toggle_port_connection"])
  		if(internal_tank.connected_port)
  			if(internal_tank.disconnect())
  