Fix sphinx build errors

This doesn't fix all of them, but clears up most of them.