The key to welding something well, is preparation.
All bits have to be a good fit before welding, it's then a case of tacking, and alternating where you weld to balance out any twisting.

Something you really have to appreciate, is just how much weld beads will shrink/pull when cooled, which is why you want a good fit, and do alternate welds to balance any pulling.

Alternatively, you could just bolt it all together, however you run the risk of knocking it out of square.