We should really start documenting the C functions better. Could you put some documentation up top here? I'm thinking we should maybe bite the bullet and do doxygen.