Refactoring to reflect design in lecture slides, incomplete