fix JSON whitespace check; more style changes