Added JSON loading code.