fix up several errors in docs (not perfect yet, but they compile)