Thanks to Micah Chalmer for this fix. There are also minor documentation updates and internal cleanups.