Add more IfOp tests + fix more bugs