Code and notes for CS1156x