Cleanup of json methods