Week 3 code cleanup