Small refactoring to make wrapper use simpler