fix and cleanup lecture 3 writeup