code clean up (WT)

Some code clean up with if else's.