Extending the wrapper code to handle arbitrary wrappers