Added tests
Got pretty much all of fromJSON() working.