Made returned data be json and did some UI improvements