Optimization of sputtered titanium nitride as a tunable metal for