Fixed JSON object and added some more functions