Added some Test code and made a few json fixes