Made the interface with json.  Should be easier to read in