cleanup and comments in JSON main script