Catalysts by pyrolysis: Direct observation of chemical and morphological transformations leading to transition metal-nitrogen-carbon materials