to square off, just go into the turn carrying pretty much spped, then just start to lean the bike down slightly but not your body so much and then apply the back brakes and it should just slide out. Once you have done that hit the gas when the back end has come around.
As far as squaring off, if you will notice the SX guys do not stop and square up like most of us. They are moving and under power when they slide up, clip the berm, and roost out. The way I was taught was to back it in under power, not the brakes. Get your braking done late, use your body to initiate the turn, get back on the gas to start the slide with power. Ideally, you have applied the power at the right time to slide it around (flat track style) clip the berm where you wanted and are not accelerating out. My thought is that the longer you are on the brakes and off the throttle, the more you slow down. Less brakes, more gas.
I see a bunch of guys who slide the rear wheel up into the berm and use that slide with the wheel locked (or close to locked) to slide up and hit the berm. Then they dump the clutch and accelerate out. I try my hardest to keep the rear wheel driving, even just a little and use the power to slide up and squre off. A second point here would be that you shouldn't pivot turn like a SX unless it is really necessary.