Lesson 1: Fixed some compile errors and warnings.