Add ability to toggle response display
Better error handling and moving JSON parsing to index.js