Remove and consolidate various uses of reflection.

I'm actually going to want to use this merge functionality sooner rather than later, so getting around to this will be very helpful.