Fixing incorrect extension check condition (were "!!" instead of "!").
Whitespace changes only. Standardize 4-space indent