Titanium as an endogenous grain-refining nucleus