Electron energy-loss spectroscopy (EELS) was combined with heat capacity measurements to follow the change of superconductivity with systematic Al doping of MgB$_2$. By using x-ray diffraction and Vegards law to assess the actual Al content in the samples, changes in behavior were found to be much more in agreement with theoretical predictions than in earlier studies. EELS data show that $sigma$-band hole states disappear above 33% Al, approximately the composition at which the $sigma$ band Fermi surface is predicted to lose its cylindrical shape in reciprocal space and break apart into ellipsoidal pockets. At this composition, the $sigma$ gap obtained from the heat capacity data falls to the level of the $pi$ gap, implying that band filling results in the loss of strong superconductivity on the $sigma$ band. However, superconductivity is not quenched completely, but persists with $T_c < 7$ K up to about 55% Al, the Al concentration at which the entire $sigma$ band is predicted to fall below the Fermi surface. Since, in the region $0.33 alt x alt 0.55$, only the $pi$ band has appreciable density of states, it becomes the stronger of the 2 bands, thus inverting the 2-band hierarchy of MgB$_2$.