Cleaned ifs

Thanks to Ian-Foote