First draft of function material combined from my and Audrey's notes. Fixed some typos as well.