Lecture notes: finished writing up