Add helper methods, cleanup
Add IfOp tests + fix bugs

TIL FYI IANAP: Tests fix bugs!