Cleaned up formatting and merged more appropriate syntax from JSONExport, which is a newer tool.