fixed some minor errors per Chris's comments