Cleaned-up lesson 13 code