Added a bunch of accessors and convert test.c