made some stylistic fixes per andy's comments