Update documentation and bug fixes