Fixed a segfault, added API documentation, wrote talk functions