Updated main to read from JSON files.