make a conditional block into elegant one-liner

This also removes some verbosity.
add whitespace before comments