Cleaned up code: Week 3