Fixed code so it would compile, but there are still existing errors.