Cleaning the code up a little

Everything works. There still needs to be testing on corner cases and
error handling, but the main functionality is all here. Note that the
test cases in rapidJSON_wrapper.c's main function need to be removed
before going into production.