Added annotations to the file to explain what is happening.