Various changes

Here are a few fixes that I've recently encountered, as well as some documentation and additional functionality.