Examine the function of the olfactory nerve within the nasal cavity.