Wrap helper functions so that they are applied in the correct scope