This addresses Dmitry's and Jameson's review comments from id:"87k46572f7.fsf at gmail.com" id:"87liqk5dly.fsf at servo.finestructure.net" id:"87hb187iu6.fsf at gmail.com" and rebases to current master. I'd like a quick eye over this to make sure I didn't screw anything up in the latest version, but otherwise I think it's ready to go in.