The reversible amorphous-cubic phase transition in GST has already been successfully applied in phase-change memory devices. However, there are proposals that an amorphous-hexagonal-cubic transition could offer the possibility of a tri-state memory device, thereby doubling the current data storage capacity. In this study, the structural, thermal, electronic and optical properties of hexagonal and cubic GST have been simulated from first principles. Although pure GST exhibits superior qualities in terms of speed of transition and thermal stability, several aspects such as the minimization of the writing current and a reduction in the wavelength of the writing laser beam need to be addressed. In this study, the effect of nitrogen doping on the optical and electronic properties of GST has been analyzed from first principles.