Fixed a number of typing errors so the program now compiles