Pre-lecture commit 3. Fixing some bugs that Burt found.