Update documentation and fix a few errors