An LTE Code for the Inversion of Stokes Spectra from Solar Magnetic Elements