Start with C API accessors and tests

If this approach is OK, I'll go ahead and add more accessors and tests.