Two types of TiN/HfOx/TiN devices have been fabricated where the top 200nm TiN electrode has been deposited by two different sputtering methods; reactive, using a titanium target in a nitrogen environment, and non-reactive, using a titanium nitride target. Characterization of the materials shows that the reactive TiN is single-phase stoichiometric TiN with a sheet resistance of 7Ω/square. The non-reactive TiN has a sheet resistance of 300Ω/square and was found to contain significant amounts of oxygen. The resistive switching behavior differs for both devices. The reactive stoichiometric TiN device results in bipolar switching with a Roff/Ron ratio of 50. The non-reactive TiN results in unipolar switching with a Roff/Ron ratio of more than 103, however this device shows poor reproducibility. These results show that an oxygen rich layer between the top electrode and insulator affects the Roff value. It supports the theory of oxygen vacancies leading to the formation of conductive filaments.