Made some minor changes and removed some compiler errors.