Updated loop/if/with to be more consistent