A first aspect of the invention provides for a nonvolatile memory cell comprising: a diode; and a resistance-switching element comprising a layer of a resistivity-switching metal oxide or nitride compound, the metal oxide or nitride compound including only one metal, wherein the diode and resistance-switching element are portions of the memory cell.