cleanup, reworked json to get detailed stats