The current C++ API does not make it especially easy to write a high-level language interface. Change it so that it is. Codependent with #59.