Significant changes to use new Json library for performance and ease of use