Expanded json unit tests, related fixes