Fix docs

This tweaks a bunch of things about the docs. It also cleans up our code so that it's more Sphinx-compliant. This isn't meant to 100% fix the docs, but it at least moves us in that direction.