improve readability of conditionals

Changed some conditional blocks from

IF(NOT X)
   A
ELSE()
   B
ENDIF()

to

IF(X)
  B
ELSE()
  A
ENDIF()

This makes things easier to read since one doesn't have to apply "not not
logic" for the ELSE block.