Refactor some lesson 11 stuff