If you're replacing the lines make sure you've got the proper size wrenches and that you try and turn the fittings the proper direction. Things can get ugly if you round-off the fittings.
After you've replaced all the lines bleed the entire system well. I mean keep bleeding (in the proper sequence) until you have clean fluid coming out the bleed valve at each wheel cylinder. At first you're almost certain to have coffee-looking crap coming out, but by effectively replacing all the fluid in your system you'll end up with better feeling and working brakes.