A photovoltaic cell can include a nitrogen-containing metal layer in contact with a semiconductor layer.