Code from Tuts+ courses.