cleanup and better JSON structure