Add documentation + a few other misc changes

This pull request mainly adds a first draft of documentation. It's still missing lots of examples and a more in-depth guide section.

Also comes with a few misc. changes that were helpful for writing the docs.