minor updates to error messages, better error trigger in json()
added tests for some of the new functionality, still not 100%