Use a pair of long nose visegrips and some cardboard to clamp off the rubber brake hose before removing the pipe from the cylinder. That way air won't seep all the way back to the master, making bleeding a much easier affair. Also if the pipe doesn't want to turn easily from the old cylinder, heat the pipe fitting with a torch-propane plumbing type will do- just until it gets a little red and then quickly cool with lots of cold water.