An improved functional approach for designing MRI (magnetic resonance imaging) main magnets with active shielding is presented. By nulling one or two external moments as well as a certain series of internal moments of the magnetic field, new designs with improved shielding in combination with or without shorter magnet lengths are obtained. The improved method can be employed to design short and practical superconducting magnets at any given field strength. The resulting designs yield the desired field homogeneity inside the region of interest without using superconducting shim coils. This approach requires only a modest amount of computing power. One of the design steps, a contour plot of the continuous current solutions, can be utilized to study stretch goals for favorable design parameters.