Fix two typos.
Generate the API reference in text format, too.
Fix memory leaks when creating a context.