more consistent  sanitization.
fixed if() styling