Converted phrases array into JSON. Could still do with being refactored.