Now committing Norvig's code in class form.