New Methods for Quantifying X-ray Spectra in a Transmission Electron Microscope