Whoever invented AJAX is awesome and evil at the same time . . .. this is hard.