Share code b/w (un)bound if helpers

Also, got rid of unnecessary anonymous function.
win win win win win win win win