The magnesium and aluminium Kalpha x-ray line structures, for application to x-ray photoelectron spectroscopy peak analysis, have been re-examined for the Kalpha1, Kalpha2, Kalpha', Kalpha3, Kalpha4, Kalpha5 and Kalpha6 components. Commonly employed literature source functions are compared with each other and to the refined functions in this work. In terms of both useful removal of x-ray satellite structure and general x-ray broadening effects, a detailed description of the complete minor satellite structure is less important than an accurate representation of the main lines and the six most intense satellites, including the generally ignored Kalpha3'. Some of the inaccuracies have arisen from the inappropriate adoption of x-ray emission data without the removal of spectrometer broadening. Other errors in determining the source functions come from the excessive smoothing employed in the noise reduction necessary for deconvoluted spectra. This obliterates localized oscillations, which can actually be removed by fine-tuning component parameters without resorting to increased smoothing or filtering. it is demonstrated that reductions in spectral component width of up to 50% are possible.