Fixing issue from security review and making json building/testing smarter