Update documentation, fix errors