anchor.diff:  					A pause may be denoted by an empty chord: <i>C,E,,C,G</i><br>
   					To make a chord be a different time, end it with /x, where the chord length will be length<br>
   					defined by tempo / x: <i>C,G/2,E/4</i><br>
  -					Combined, an example is: <i>E-E4/4,/2,G#/8,B/8,E3-E4/4</i>
  +					Combined, an example is: <i>E-E4/4,F#/2,G#/8,B/8,E3-E4/4</i>
   					<br>
   					Lines may be up to 50 characters.<br>
   					A song may only contain up to 50 lines.<br>
   					"}
   		else
  -			dat += "<A href='?src=\ref[src];help=2'>Show Help</A><BR>"
  -	dat += "</BODY></HTML>"
  -	user << browse(dat, "window=violin;size=700x300")
  -	onclose(user, "violin")
  +			dat += "<B><A href='?src=\ref[src];help=2'>Show Help</A></B><BR>"
  +
  +	var/datum/browser/popup = new(user, "apc", name)
  +	popup.set_content(dat)
  +	popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
  +	popup.open()
  +	return
   
   /obj/item/device/violin/Topic(href, href_list)
  -
   	if(!in_range(src, usr) || issilicon(usr) || !isliving(usr) || !usr.canmove || usr.restrained())
  -		usr << browse(null, "window=violin;size=700x300")
  -		onclose(usr, "violin")
  +		usr << browse(null, "window=violin")
  +		usr.unset_machine()
   		return
  +
  +	add_fingerprint(usr)
   
   	if(href_list["newsong"])
   		song = new()
  +
  +	else if(href_list["import"])
  +		var/t = ""
  +		do
  +			t = html_encode(input(usr, "Please paste the entire song, formatted:", text("[]", name), t)  as message)
  +			if(!in_range(src, usr))
  +				return
  +
  +			if(lentext(t) >= 3072)
  +				var/cont = input(usr, "Your message is too long! Would you like to continue editing it?", "", "yes") in list("yes", "no")
  +				if(cont == "no")
  +					break
  +		while(lentext(t) > 3072)
  +
  +		//split into lines
  +		spawn()
  +			var/list/lines = text2list(t, "\n")
  +			var/tempo = 5
  +			if(copytext(lines[1],1,6) == "BPM: ")
  +				tempo = 600 / text2num(copytext(lines[1],6))
  +				lines.Cut(1,2)
  +			if(lines.len > 50)
  +				usr << "Too many lines!"
  +				lines.Cut(51)
  +			var/linenum = 1
  +			for(var/l in lines)
  +				if(lentext(l) > 50)
  +					usr << "Line [linenum] too long!"
  +					lines.Remove(l)
  +				else
  +					linenum++
  +			song = new()
  +			song.lines = lines
  +			song.tempo = tempo
  +			interact(usr)		// make sure updates when complete
  +
  +	else if(href_list["help"])
  +		help = text2num(href_list["help"]) - 1
  +
  +	else if(href_list["edit"])
  +		edit = text2num(href_list["edit"]) - 1
  +
   	else if(song)
   		if(href_list["repeat"]) //Changing this from a toggle to a number of repeats to avoid infinite loops.
  -			if(playing) return //So that people cant keep adding to repeat. If the do it intentionally, it could result in the server crashing.
  -			var/tempnum = input("How many times do you want to repeat this piece? (max:10)") as num|null
  -			if(tempnum > 10)
  -				tempnum = 10
  -			if(tempnum < 0)
  -				tempnum = 0
  -			repeat = round(tempnum)
  +			if(playing)
  +				return //So that people cant keep adding to repeat. If the do it intentionally, it could result in the server crashing.
  +			repeat += round(text2num(href_list["repeat"]))
  +			if(repeat < 0)
  +				repeat = 0
  +			if(repeat > max_repeats)
  +				repeat = max_repeats
   
   		else if(href_list["tempo"])
  -			song.tempo += round(text2num(href_list["tempo"]))
  +			song.tempo += text2num(href_list["tempo"])
   			if(song.tempo < 1)
   				song.tempo = 1
  +			if(song.tempo > 600)
  +				song.tempo = 600
   
   		else if(href_list["play"])
   			if(song)
   				playing = 1
  -				spawn() playsong()
  +				spawn()
  +					playsong(usr)
   
   		else if(href_list["newline"])
   			var/newline = html_encode(input("Enter your line: ", "violin") as text|null)
  
positive.code: 
  	hearers(15, get_turf(src)) << sound(soundfile)
  
  /obj/item/device/violin/proc/playsong()
  	do
  		var/cur_oct[7]
  		var/cur_acc[7]
  		for(var/i = 1 to 7)
  
negative.code: 					sleep(song.tempo / text2num(notes[2]))
  				else
  					sleep(song.tempo)
  		repeat--
  		if(repeat >= 0) // don't show the last -1 repeat
  			interact(user)
  	playing = 0
  	repeat = 0
  	interact(user)
  
  /obj/item/device/violin/attack_self(mob/user as mob)
  	if(!isliving(user) || user.stat || user.restrained() || user.lying)	return
  	user.set_machine(src)
  	interact(user)
  
  /obj/item/device/violin/interact(mob/user as mob)
  	if(!user)
  		return
  
  	if(!isliving(user) || user.stat || user.restrained() || user.lying)	return
  
  	var/dat = ""
  
  	if(song && song.lines.len > 0)
  		dat += "<H3>Playback</H3>"
  		if(!playing)
  			dat += "<A href='?src=\ref[src];play=1'>Play</A> <SPAN CLASS='linkOn'>Stop</SPAN><BR><BR>"
  			dat += "Repeat Song: "
  			dat += repeat > 0 ? "<A href='?src=\ref[src];repeat=-10'>-</A><A href='?src=\ref[src];repeat=-1'>-</A>" : "<SPAN CLASS='linkOff'>-</SPAN><SPAN CLASS='linkOff'>-</SPAN>"
  			dat += " [repeat] times "
  			dat += repeat < max_repeats ? "<A href='?src=\ref[src];repeat=1'>+</A><A href='?src=\ref[src];repeat=10'>+</A>" : "<SPAN CLASS='linkOff'>+</SPAN><SPAN CLASS='linkOff'>+</SPAN>"
  			dat += "<BR>"
  		else
  			dat += "<SPAN CLASS='linkOn'>Play</SPAN> <A href='?src=\ref[src];stop=1'>Stop</A><BR>"
  			dat += "Repeats left: <B>[repeat]</B><BR>"
  	if(!edit)
  		dat += "<BR><B><A href='?src=\ref[src];edit=2'>Show Editor</A></B><BR>"
  	else
  		dat += "<H3>Editing</H3>"
  		dat += "<B><A href='?src=\ref[src];edit=1'>Hide Editor</A></B>"
  		dat += " <A href='?src=\ref[src];newsong=1'>Start a New Song</A>"
  		dat += " <A href='?src=\ref[src];import=1'>Import a Song</A><BR><BR>"
  		if(song)
  			var/calctempo = round(600 / song.tempo)
  			var/calcstep = song.tempo - 600 / (calctempo+1)
  			var/calcstep_b = song.tempo - 600 / (calctempo+10)
  			dat += "Tempo: <A href='?src=\ref[src];tempo=[calcstep_b]'>-</A><A href='?src=\ref[src];tempo=[calcstep]'>-</A> [calctempo] BPM <A href='?src=\ref[src];tempo=-[calcstep]'>+</A><A href='?src=\ref[src];tempo=-[calcstep_b]'>+</A><BR><BR>"
  			var/linecount = 0
  			for(var/line in song.lines)
  				linecount += 1
  				dat += "Line [linecount]: <A href='?src=\ref[src];modifyline=[linecount]'>Edit</A> <A href='?src=\ref[src];deleteline=[linecount]'>X</A> [line]<BR>"
  			dat += "<A href='?src=\ref[src];newline=1'>Add Line</A><BR><BR>"
  		if(help)
  			dat += "<B><A href='?src=\ref[src];help=1'>Hide Help</A></B><BR>"
  			dat += {"
  					Lines are a series of chords, separated by commas (,), each with notes seperated by hyphens (-).<br>
  					Every note in a chord will play together, with chord timed by the tempo.<br>
  