cleaning up json data structure