Added tests and some fixes to json formatting.
All JSON is now read as dicts