cleaned up output, implemented gson, now outputs into json